/*
 *  DialogTree.h
 *  SquirrelAdven
 *
 *  Created by Wen Xu on 3/7/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include "DialogNode.h"
#include <string>

using namespace std;

class DialogTree {
protected:
	DialogNode * root;
	vector<DialogNode> nodeList;
	string filename;
	
	void parseData();
	void printData(DialogNode * cur);
	
public:
	DialogTree(string filename);
	~DialogTree();
	
	DialogNode * getRoot();
	string getCurrentDialogText(DialogNode * cur);
	DialogNode * getDialogNodeByID(int ID);
	int getLastDialogID();
	DialogNode * getNextDialogNode(DialogNode * cur, int option);
	
	void printData();
};